3.2.14 \(\int \frac {4+x^2+3 x^4+5 x^6}{x^2 (3+2 x^2+x^4)^2} \, dx\) [114]

3.2.14.1 Optimal result
3.2.14.2 Mathematica [C] (verified)
3.2.14.3 Rubi [A] (verified)
3.2.14.4 Maple [C] (verified)
3.2.14.5 Fricas [C] (verification not implemented)
3.2.14.6 Sympy [B] (verification not implemented)
3.2.14.7 Maxima [F]
3.2.14.8 Giac [B] (verification not implemented)
3.2.14.9 Mupad [B] (verification not implemented)

3.2.14.1 Optimal result

Integrand size = 31, antiderivative size = 229 \[ \int \frac {4+x^2+3 x^4+5 x^6}{x^2 \left (3+2 x^2+x^4\right )^2} \, dx=-\frac {4}{9 x}-\frac {25 x \left (5+x^2\right )}{72 \left (3+2 x^2+x^4\right )}+\frac {1}{48} \sqrt {\frac {1}{6} \left (-965+699 \sqrt {3}\right )} \arctan \left (\frac {\sqrt {2 \left (-1+\sqrt {3}\right )}-2 x}{\sqrt {2 \left (1+\sqrt {3}\right )}}\right )-\frac {1}{48} \sqrt {\frac {1}{6} \left (-965+699 \sqrt {3}\right )} \arctan \left (\frac {\sqrt {2 \left (-1+\sqrt {3}\right )}+2 x}{\sqrt {2 \left (1+\sqrt {3}\right )}}\right )-\frac {1}{96} \sqrt {\frac {1}{6} \left (965+699 \sqrt {3}\right )} \log \left (\sqrt {3}-\sqrt {2 \left (-1+\sqrt {3}\right )} x+x^2\right )+\frac {1}{96} \sqrt {\frac {1}{6} \left (965+699 \sqrt {3}\right )} \log \left (\sqrt {3}+\sqrt {2 \left (-1+\sqrt {3}\right )} x+x^2\right ) \]

output
-4/9/x-25/72*x*(x^2+5)/(x^4+2*x^2+3)+1/288*arctan((-2*x+(-2+2*3^(1/2))^(1/ 
2))/(2+2*3^(1/2))^(1/2))*(-5790+4194*3^(1/2))^(1/2)-1/288*arctan((2*x+(-2+ 
2*3^(1/2))^(1/2))/(2+2*3^(1/2))^(1/2))*(-5790+4194*3^(1/2))^(1/2)-1/576*ln 
(x^2+3^(1/2)-x*(-2+2*3^(1/2))^(1/2))*(5790+4194*3^(1/2))^(1/2)+1/576*ln(x^ 
2+3^(1/2)+x*(-2+2*3^(1/2))^(1/2))*(5790+4194*3^(1/2))^(1/2)
 
3.2.14.2 Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 0.12 (sec) , antiderivative size = 126, normalized size of antiderivative = 0.55 \[ \int \frac {4+x^2+3 x^4+5 x^6}{x^2 \left (3+2 x^2+x^4\right )^2} \, dx=-\frac {4}{9 x}-\frac {25 x \left (5+x^2\right )}{72 \left (3+2 x^2+x^4\right )}-\frac {\left (26 i+19 \sqrt {2}\right ) \arctan \left (\frac {x}{\sqrt {1-i \sqrt {2}}}\right )}{48 \sqrt {2-2 i \sqrt {2}}}-\frac {\left (-26 i+19 \sqrt {2}\right ) \arctan \left (\frac {x}{\sqrt {1+i \sqrt {2}}}\right )}{48 \sqrt {2+2 i \sqrt {2}}} \]

input
Integrate[(4 + x^2 + 3*x^4 + 5*x^6)/(x^2*(3 + 2*x^2 + x^4)^2),x]
 
output
-4/(9*x) - (25*x*(5 + x^2))/(72*(3 + 2*x^2 + x^4)) - ((26*I + 19*Sqrt[2])* 
ArcTan[x/Sqrt[1 - I*Sqrt[2]]])/(48*Sqrt[2 - (2*I)*Sqrt[2]]) - ((-26*I + 19 
*Sqrt[2])*ArcTan[x/Sqrt[1 + I*Sqrt[2]]])/(48*Sqrt[2 + (2*I)*Sqrt[2]])
 
3.2.14.3 Rubi [A] (verified)

Time = 0.55 (sec) , antiderivative size = 232, normalized size of antiderivative = 1.01, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.129, Rules used = {2198, 27, 2195, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {5 x^6+3 x^4+x^2+4}{x^2 \left (x^4+2 x^2+3\right )^2} \, dx\)

\(\Big \downarrow \) 2198

\(\displaystyle \frac {1}{48} \int \frac {2 \left (-25 x^4+85 x^2+96\right )}{3 x^2 \left (x^4+2 x^2+3\right )}dx-\frac {25 x \left (x^2+5\right )}{72 \left (x^4+2 x^2+3\right )}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {1}{72} \int \frac {-25 x^4+85 x^2+96}{x^2 \left (x^4+2 x^2+3\right )}dx-\frac {25 x \left (x^2+5\right )}{72 \left (x^4+2 x^2+3\right )}\)

\(\Big \downarrow \) 2195

\(\displaystyle \frac {1}{72} \int \left (\frac {32}{x^2}-\frac {3 \left (19 x^2-7\right )}{x^4+2 x^2+3}\right )dx-\frac {25 x \left (x^2+5\right )}{72 \left (x^4+2 x^2+3\right )}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {1}{72} \left (\frac {1}{2} \sqrt {\frac {3}{2} \left (699 \sqrt {3}-965\right )} \arctan \left (\frac {\sqrt {2 \left (\sqrt {3}-1\right )}-2 x}{\sqrt {2 \left (1+\sqrt {3}\right )}}\right )-\frac {1}{2} \sqrt {\frac {3}{2} \left (699 \sqrt {3}-965\right )} \arctan \left (\frac {2 x+\sqrt {2 \left (\sqrt {3}-1\right )}}{\sqrt {2 \left (1+\sqrt {3}\right )}}\right )-\frac {1}{4} \sqrt {\frac {3}{2} \left (965+699 \sqrt {3}\right )} \log \left (x^2-\sqrt {2 \left (\sqrt {3}-1\right )} x+\sqrt {3}\right )+\frac {1}{4} \sqrt {\frac {3}{2} \left (965+699 \sqrt {3}\right )} \log \left (x^2+\sqrt {2 \left (\sqrt {3}-1\right )} x+\sqrt {3}\right )-\frac {32}{x}\right )-\frac {25 x \left (x^2+5\right )}{72 \left (x^4+2 x^2+3\right )}\)

input
Int[(4 + x^2 + 3*x^4 + 5*x^6)/(x^2*(3 + 2*x^2 + x^4)^2),x]
 
output
(-25*x*(5 + x^2))/(72*(3 + 2*x^2 + x^4)) + (-32/x + (Sqrt[(3*(-965 + 699*S 
qrt[3]))/2]*ArcTan[(Sqrt[2*(-1 + Sqrt[3])] - 2*x)/Sqrt[2*(1 + Sqrt[3])]])/ 
2 - (Sqrt[(3*(-965 + 699*Sqrt[3]))/2]*ArcTan[(Sqrt[2*(-1 + Sqrt[3])] + 2*x 
)/Sqrt[2*(1 + Sqrt[3])]])/2 - (Sqrt[(3*(965 + 699*Sqrt[3]))/2]*Log[Sqrt[3] 
 - Sqrt[2*(-1 + Sqrt[3])]*x + x^2])/4 + (Sqrt[(3*(965 + 699*Sqrt[3]))/2]*L 
og[Sqrt[3] + Sqrt[2*(-1 + Sqrt[3])]*x + x^2])/4)/72
 

3.2.14.3.1 Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2195
Int[(Pq_)*((d_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_ 
Symbol] :> Int[ExpandIntegrand[(d*x)^m*Pq*(a + b*x^2 + c*x^4)^p, x], x] /; 
FreeQ[{a, b, c, d, m}, x] && PolyQ[Pq, x^2] && IGtQ[p, -2]
 

rule 2198
Int[(Pq_)*(x_)^(m_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> 
 With[{Qx = PolynomialQuotient[x^m*Pq, a + b*x^2 + c*x^4, x], d = Coeff[Pol 
ynomialRemainder[x^m*Pq, a + b*x^2 + c*x^4, x], x, 0], e = Coeff[Polynomial 
Remainder[x^m*Pq, a + b*x^2 + c*x^4, x], x, 2]}, Simp[x*(a + b*x^2 + c*x^4) 
^(p + 1)*((a*b*e - d*(b^2 - 2*a*c) - c*(b*d - 2*a*e)*x^2)/(2*a*(p + 1)*(b^2 
 - 4*a*c))), x] + Simp[1/(2*a*(p + 1)*(b^2 - 4*a*c))   Int[x^m*(a + b*x^2 + 
 c*x^4)^(p + 1)*ExpandToSum[(2*a*(p + 1)*(b^2 - 4*a*c)*Qx)/x^m + (b^2*d*(2* 
p + 3) - 2*a*c*d*(4*p + 5) - a*b*e)/x^m + c*(4*p + 7)*(b*d - 2*a*e)*x^(2 - 
m), x], x], x]] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x^2] && GtQ[Expon[Pq, x 
^2], 1] && NeQ[b^2 - 4*a*c, 0] && LtQ[p, -1] && ILtQ[m/2, 0]
 
3.2.14.4 Maple [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 3.

Time = 0.10 (sec) , antiderivative size = 63, normalized size of antiderivative = 0.28

method result size
risch \(\frac {-\frac {19}{24} x^{4}-\frac {21}{8} x^{2}-\frac {4}{3}}{x \left (x^{4}+2 x^{2}+3\right )}+\frac {\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (3 \textit {\_Z}^{4}-1930 \textit {\_Z}^{2}+488601\right )}{\sum }\textit {\_R} \ln \left (-96 \textit {\_R}^{3}+34499 \textit {\_R} +361383 x \right )\right )}{96}\) \(63\)
default \(-\frac {4}{9 x}-\frac {\frac {25}{8} x^{3}+\frac {125}{8} x}{9 \left (x^{4}+2 x^{2}+3\right )}-\frac {\left (32 \sqrt {-2+2 \sqrt {3}}\, \sqrt {3}+39 \sqrt {-2+2 \sqrt {3}}\right ) \ln \left (x^{2}+\sqrt {3}-x \sqrt {-2+2 \sqrt {3}}\right )}{576}-\frac {\left (-14 \sqrt {3}+\frac {\left (32 \sqrt {-2+2 \sqrt {3}}\, \sqrt {3}+39 \sqrt {-2+2 \sqrt {3}}\right ) \sqrt {-2+2 \sqrt {3}}}{2}\right ) \arctan \left (\frac {2 x -\sqrt {-2+2 \sqrt {3}}}{\sqrt {2+2 \sqrt {3}}}\right )}{144 \sqrt {2+2 \sqrt {3}}}-\frac {\left (-32 \sqrt {-2+2 \sqrt {3}}\, \sqrt {3}-39 \sqrt {-2+2 \sqrt {3}}\right ) \ln \left (x^{2}+\sqrt {3}+x \sqrt {-2+2 \sqrt {3}}\right )}{576}-\frac {\left (-14 \sqrt {3}-\frac {\left (-32 \sqrt {-2+2 \sqrt {3}}\, \sqrt {3}-39 \sqrt {-2+2 \sqrt {3}}\right ) \sqrt {-2+2 \sqrt {3}}}{2}\right ) \arctan \left (\frac {2 x +\sqrt {-2+2 \sqrt {3}}}{\sqrt {2+2 \sqrt {3}}}\right )}{144 \sqrt {2+2 \sqrt {3}}}\) \(283\)

input
int((5*x^6+3*x^4+x^2+4)/x^2/(x^4+2*x^2+3)^2,x,method=_RETURNVERBOSE)
 
output
(-19/24*x^4-21/8*x^2-4/3)/x/(x^4+2*x^2+3)+1/96*sum(_R*ln(-96*_R^3+34499*_R 
+361383*x),_R=RootOf(3*_Z^4-1930*_Z^2+488601))
 
3.2.14.5 Fricas [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.25 (sec) , antiderivative size = 230, normalized size of antiderivative = 1.00 \[ \int \frac {4+x^2+3 x^4+5 x^6}{x^2 \left (3+2 x^2+x^4\right )^2} \, dx=-\frac {228 \, x^{4} + \sqrt {3} {\left (x^{5} + 2 \, x^{3} + 3 \, x\right )} \sqrt {517 i \, \sqrt {2} + 965} \log \left (\sqrt {3} \sqrt {517 i \, \sqrt {2} + 965} {\left (32 i \, \sqrt {2} - 7\right )} + 2097 \, x\right ) - \sqrt {3} {\left (x^{5} + 2 \, x^{3} + 3 \, x\right )} \sqrt {517 i \, \sqrt {2} + 965} \log \left (\sqrt {3} \sqrt {517 i \, \sqrt {2} + 965} {\left (-32 i \, \sqrt {2} + 7\right )} + 2097 \, x\right ) - \sqrt {3} {\left (x^{5} + 2 \, x^{3} + 3 \, x\right )} \sqrt {-517 i \, \sqrt {2} + 965} \log \left (\sqrt {3} {\left (32 i \, \sqrt {2} + 7\right )} \sqrt {-517 i \, \sqrt {2} + 965} + 2097 \, x\right ) + \sqrt {3} {\left (x^{5} + 2 \, x^{3} + 3 \, x\right )} \sqrt {-517 i \, \sqrt {2} + 965} \log \left (\sqrt {3} {\left (-32 i \, \sqrt {2} - 7\right )} \sqrt {-517 i \, \sqrt {2} + 965} + 2097 \, x\right ) + 756 \, x^{2} + 384}{288 \, {\left (x^{5} + 2 \, x^{3} + 3 \, x\right )}} \]

input
integrate((5*x^6+3*x^4+x^2+4)/x^2/(x^4+2*x^2+3)^2,x, algorithm="fricas")
 
output
-1/288*(228*x^4 + sqrt(3)*(x^5 + 2*x^3 + 3*x)*sqrt(517*I*sqrt(2) + 965)*lo 
g(sqrt(3)*sqrt(517*I*sqrt(2) + 965)*(32*I*sqrt(2) - 7) + 2097*x) - sqrt(3) 
*(x^5 + 2*x^3 + 3*x)*sqrt(517*I*sqrt(2) + 965)*log(sqrt(3)*sqrt(517*I*sqrt 
(2) + 965)*(-32*I*sqrt(2) + 7) + 2097*x) - sqrt(3)*(x^5 + 2*x^3 + 3*x)*sqr 
t(-517*I*sqrt(2) + 965)*log(sqrt(3)*(32*I*sqrt(2) + 7)*sqrt(-517*I*sqrt(2) 
 + 965) + 2097*x) + sqrt(3)*(x^5 + 2*x^3 + 3*x)*sqrt(-517*I*sqrt(2) + 965) 
*log(sqrt(3)*(-32*I*sqrt(2) - 7)*sqrt(-517*I*sqrt(2) + 965) + 2097*x) + 75 
6*x^2 + 384)/(x^5 + 2*x^3 + 3*x)
 
3.2.14.6 Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1192 vs. \(2 (184) = 368\).

Time = 0.76 (sec) , antiderivative size = 1192, normalized size of antiderivative = 5.21 \[ \int \frac {4+x^2+3 x^4+5 x^6}{x^2 \left (3+2 x^2+x^4\right )^2} \, dx=\text {Too large to display} \]

input
integrate((5*x**6+3*x**4+x**2+4)/x**2/(x**4+2*x**2+3)**2,x)
 
output
(-19*x**4 - 63*x**2 - 32)/(24*x**5 + 48*x**3 + 72*x) - sqrt(965/55296 + 23 
3*sqrt(3)/18432)*log(x**2 + x*(-128*sqrt(2)*sqrt(965 + 699*sqrt(3))/517 - 
21793*sqrt(6)*sqrt(965 + 699*sqrt(3))/361383 + 64*sqrt(3)*sqrt(965 + 699*s 
qrt(3))*sqrt(674535*sqrt(3) + 1198514)/361383) - 8882635459*sqrt(2)*sqrt(6 
74535*sqrt(3) + 1198514)/130597672689 - 20458048*sqrt(6)*sqrt(674535*sqrt( 
3) + 1198514)/560505033 + 18567565928783/130597672689 + 46950427730*sqrt(3 
)/560505033) + sqrt(965/55296 + 233*sqrt(3)/18432)*log(x**2 + x*(-64*sqrt( 
3)*sqrt(965 + 699*sqrt(3))*sqrt(674535*sqrt(3) + 1198514)/361383 + 21793*s 
qrt(6)*sqrt(965 + 699*sqrt(3))/361383 + 128*sqrt(2)*sqrt(965 + 699*sqrt(3) 
)/517) - 8882635459*sqrt(2)*sqrt(674535*sqrt(3) + 1198514)/130597672689 - 
20458048*sqrt(6)*sqrt(674535*sqrt(3) + 1198514)/560505033 + 18567565928783 
/130597672689 + 46950427730*sqrt(3)/560505033) + 2*sqrt(-sqrt(2)*sqrt(6745 
35*sqrt(3) + 1198514)/27648 + 965/55296 + 233*sqrt(3)/6144)*atan(722766*sq 
rt(3)*x/(-64*sqrt(674535*sqrt(3) + 1198514)*sqrt(-2*sqrt(2)*sqrt(674535*sq 
rt(3) + 1198514) + 965 + 2097*sqrt(3)) + 3619*sqrt(2)*sqrt(-2*sqrt(2)*sqrt 
(674535*sqrt(3) + 1198514) + 965 + 2097*sqrt(3))) + 89472*sqrt(6)*sqrt(965 
 + 699*sqrt(3))/(-64*sqrt(674535*sqrt(3) + 1198514)*sqrt(-2*sqrt(2)*sqrt(6 
74535*sqrt(3) + 1198514) + 965 + 2097*sqrt(3)) + 3619*sqrt(2)*sqrt(-2*sqrt 
(2)*sqrt(674535*sqrt(3) + 1198514) + 965 + 2097*sqrt(3))) + 65379*sqrt(2)* 
sqrt(965 + 699*sqrt(3))/(-64*sqrt(674535*sqrt(3) + 1198514)*sqrt(-2*sqr...
 
3.2.14.7 Maxima [F]

\[ \int \frac {4+x^2+3 x^4+5 x^6}{x^2 \left (3+2 x^2+x^4\right )^2} \, dx=\int { \frac {5 \, x^{6} + 3 \, x^{4} + x^{2} + 4}{{\left (x^{4} + 2 \, x^{2} + 3\right )}^{2} x^{2}} \,d x } \]

input
integrate((5*x^6+3*x^4+x^2+4)/x^2/(x^4+2*x^2+3)^2,x, algorithm="maxima")
 
output
-1/24*(19*x^4 + 63*x^2 + 32)/(x^5 + 2*x^3 + 3*x) - 1/24*integrate((19*x^2 
- 7)/(x^4 + 2*x^2 + 3), x)
 
3.2.14.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 572 vs. \(2 (160) = 320\).

Time = 0.58 (sec) , antiderivative size = 572, normalized size of antiderivative = 2.50 \[ \int \frac {4+x^2+3 x^4+5 x^6}{x^2 \left (3+2 x^2+x^4\right )^2} \, dx=\frac {1}{62208} \, \sqrt {2} {\left (19 \cdot 3^{\frac {3}{4}} \sqrt {2} {\left (6 \, \sqrt {3} + 18\right )}^{\frac {3}{2}} + 342 \cdot 3^{\frac {3}{4}} \sqrt {2} \sqrt {6 \, \sqrt {3} + 18} {\left (\sqrt {3} - 3\right )} - 342 \cdot 3^{\frac {3}{4}} {\left (\sqrt {3} + 3\right )} \sqrt {-6 \, \sqrt {3} + 18} + 19 \cdot 3^{\frac {3}{4}} {\left (-6 \, \sqrt {3} + 18\right )}^{\frac {3}{2}} + 252 \cdot 3^{\frac {1}{4}} \sqrt {2} \sqrt {6 \, \sqrt {3} + 18} - 252 \cdot 3^{\frac {1}{4}} \sqrt {-6 \, \sqrt {3} + 18}\right )} \arctan \left (\frac {3^{\frac {3}{4}} {\left (x + 3^{\frac {1}{4}} \sqrt {-\frac {1}{6} \, \sqrt {3} + \frac {1}{2}}\right )}}{3 \, \sqrt {\frac {1}{6} \, \sqrt {3} + \frac {1}{2}}}\right ) + \frac {1}{62208} \, \sqrt {2} {\left (19 \cdot 3^{\frac {3}{4}} \sqrt {2} {\left (6 \, \sqrt {3} + 18\right )}^{\frac {3}{2}} + 342 \cdot 3^{\frac {3}{4}} \sqrt {2} \sqrt {6 \, \sqrt {3} + 18} {\left (\sqrt {3} - 3\right )} - 342 \cdot 3^{\frac {3}{4}} {\left (\sqrt {3} + 3\right )} \sqrt {-6 \, \sqrt {3} + 18} + 19 \cdot 3^{\frac {3}{4}} {\left (-6 \, \sqrt {3} + 18\right )}^{\frac {3}{2}} + 252 \cdot 3^{\frac {1}{4}} \sqrt {2} \sqrt {6 \, \sqrt {3} + 18} - 252 \cdot 3^{\frac {1}{4}} \sqrt {-6 \, \sqrt {3} + 18}\right )} \arctan \left (\frac {3^{\frac {3}{4}} {\left (x - 3^{\frac {1}{4}} \sqrt {-\frac {1}{6} \, \sqrt {3} + \frac {1}{2}}\right )}}{3 \, \sqrt {\frac {1}{6} \, \sqrt {3} + \frac {1}{2}}}\right ) + \frac {1}{124416} \, \sqrt {2} {\left (342 \cdot 3^{\frac {3}{4}} \sqrt {2} {\left (\sqrt {3} + 3\right )} \sqrt {-6 \, \sqrt {3} + 18} - 19 \cdot 3^{\frac {3}{4}} \sqrt {2} {\left (-6 \, \sqrt {3} + 18\right )}^{\frac {3}{2}} + 19 \cdot 3^{\frac {3}{4}} {\left (6 \, \sqrt {3} + 18\right )}^{\frac {3}{2}} + 342 \cdot 3^{\frac {3}{4}} \sqrt {6 \, \sqrt {3} + 18} {\left (\sqrt {3} - 3\right )} + 252 \cdot 3^{\frac {1}{4}} \sqrt {2} \sqrt {-6 \, \sqrt {3} + 18} + 252 \cdot 3^{\frac {1}{4}} \sqrt {6 \, \sqrt {3} + 18}\right )} \log \left (x^{2} + 2 \cdot 3^{\frac {1}{4}} x \sqrt {-\frac {1}{6} \, \sqrt {3} + \frac {1}{2}} + \sqrt {3}\right ) - \frac {1}{124416} \, \sqrt {2} {\left (342 \cdot 3^{\frac {3}{4}} \sqrt {2} {\left (\sqrt {3} + 3\right )} \sqrt {-6 \, \sqrt {3} + 18} - 19 \cdot 3^{\frac {3}{4}} \sqrt {2} {\left (-6 \, \sqrt {3} + 18\right )}^{\frac {3}{2}} + 19 \cdot 3^{\frac {3}{4}} {\left (6 \, \sqrt {3} + 18\right )}^{\frac {3}{2}} + 342 \cdot 3^{\frac {3}{4}} \sqrt {6 \, \sqrt {3} + 18} {\left (\sqrt {3} - 3\right )} + 252 \cdot 3^{\frac {1}{4}} \sqrt {2} \sqrt {-6 \, \sqrt {3} + 18} + 252 \cdot 3^{\frac {1}{4}} \sqrt {6 \, \sqrt {3} + 18}\right )} \log \left (x^{2} - 2 \cdot 3^{\frac {1}{4}} x \sqrt {-\frac {1}{6} \, \sqrt {3} + \frac {1}{2}} + \sqrt {3}\right ) - \frac {19 \, x^{4} + 63 \, x^{2} + 32}{24 \, {\left (x^{5} + 2 \, x^{3} + 3 \, x\right )}} \]

input
integrate((5*x^6+3*x^4+x^2+4)/x^2/(x^4+2*x^2+3)^2,x, algorithm="giac")
 
output
1/62208*sqrt(2)*(19*3^(3/4)*sqrt(2)*(6*sqrt(3) + 18)^(3/2) + 342*3^(3/4)*s 
qrt(2)*sqrt(6*sqrt(3) + 18)*(sqrt(3) - 3) - 342*3^(3/4)*(sqrt(3) + 3)*sqrt 
(-6*sqrt(3) + 18) + 19*3^(3/4)*(-6*sqrt(3) + 18)^(3/2) + 252*3^(1/4)*sqrt( 
2)*sqrt(6*sqrt(3) + 18) - 252*3^(1/4)*sqrt(-6*sqrt(3) + 18))*arctan(1/3*3^ 
(3/4)*(x + 3^(1/4)*sqrt(-1/6*sqrt(3) + 1/2))/sqrt(1/6*sqrt(3) + 1/2)) + 1/ 
62208*sqrt(2)*(19*3^(3/4)*sqrt(2)*(6*sqrt(3) + 18)^(3/2) + 342*3^(3/4)*sqr 
t(2)*sqrt(6*sqrt(3) + 18)*(sqrt(3) - 3) - 342*3^(3/4)*(sqrt(3) + 3)*sqrt(- 
6*sqrt(3) + 18) + 19*3^(3/4)*(-6*sqrt(3) + 18)^(3/2) + 252*3^(1/4)*sqrt(2) 
*sqrt(6*sqrt(3) + 18) - 252*3^(1/4)*sqrt(-6*sqrt(3) + 18))*arctan(1/3*3^(3 
/4)*(x - 3^(1/4)*sqrt(-1/6*sqrt(3) + 1/2))/sqrt(1/6*sqrt(3) + 1/2)) + 1/12 
4416*sqrt(2)*(342*3^(3/4)*sqrt(2)*(sqrt(3) + 3)*sqrt(-6*sqrt(3) + 18) - 19 
*3^(3/4)*sqrt(2)*(-6*sqrt(3) + 18)^(3/2) + 19*3^(3/4)*(6*sqrt(3) + 18)^(3/ 
2) + 342*3^(3/4)*sqrt(6*sqrt(3) + 18)*(sqrt(3) - 3) + 252*3^(1/4)*sqrt(2)* 
sqrt(-6*sqrt(3) + 18) + 252*3^(1/4)*sqrt(6*sqrt(3) + 18))*log(x^2 + 2*3^(1 
/4)*x*sqrt(-1/6*sqrt(3) + 1/2) + sqrt(3)) - 1/124416*sqrt(2)*(342*3^(3/4)* 
sqrt(2)*(sqrt(3) + 3)*sqrt(-6*sqrt(3) + 18) - 19*3^(3/4)*sqrt(2)*(-6*sqrt( 
3) + 18)^(3/2) + 19*3^(3/4)*(6*sqrt(3) + 18)^(3/2) + 342*3^(3/4)*sqrt(6*sq 
rt(3) + 18)*(sqrt(3) - 3) + 252*3^(1/4)*sqrt(2)*sqrt(-6*sqrt(3) + 18) + 25 
2*3^(1/4)*sqrt(6*sqrt(3) + 18))*log(x^2 - 2*3^(1/4)*x*sqrt(-1/6*sqrt(3) + 
1/2) + sqrt(3)) - 1/24*(19*x^4 + 63*x^2 + 32)/(x^5 + 2*x^3 + 3*x)
 
3.2.14.9 Mupad [B] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 159, normalized size of antiderivative = 0.69 \[ \int \frac {4+x^2+3 x^4+5 x^6}{x^2 \left (3+2 x^2+x^4\right )^2} \, dx=-\frac {\frac {19\,x^4}{24}+\frac {21\,x^2}{8}+\frac {4}{3}}{x^5+2\,x^3+3\,x}-\frac {\mathrm {atan}\left (\frac {x\,\sqrt {2895-\sqrt {2}\,1551{}\mathrm {i}}\,517{}\mathrm {i}}{15552\,\left (\frac {517}{162}+\frac {\sqrt {2}\,3619{}\mathrm {i}}{10368}\right )}+\frac {517\,\sqrt {2}\,x\,\sqrt {2895-\sqrt {2}\,1551{}\mathrm {i}}}{31104\,\left (\frac {517}{162}+\frac {\sqrt {2}\,3619{}\mathrm {i}}{10368}\right )}\right )\,\sqrt {2895-\sqrt {2}\,1551{}\mathrm {i}}\,1{}\mathrm {i}}{144}+\frac {\mathrm {atan}\left (\frac {x\,\sqrt {2895+\sqrt {2}\,1551{}\mathrm {i}}\,517{}\mathrm {i}}{15552\,\left (-\frac {517}{162}+\frac {\sqrt {2}\,3619{}\mathrm {i}}{10368}\right )}-\frac {517\,\sqrt {2}\,x\,\sqrt {2895+\sqrt {2}\,1551{}\mathrm {i}}}{31104\,\left (-\frac {517}{162}+\frac {\sqrt {2}\,3619{}\mathrm {i}}{10368}\right )}\right )\,\sqrt {2895+\sqrt {2}\,1551{}\mathrm {i}}\,1{}\mathrm {i}}{144} \]

input
int((x^2 + 3*x^4 + 5*x^6 + 4)/(x^2*(2*x^2 + x^4 + 3)^2),x)
 
output
(atan((x*(2^(1/2)*1551i + 2895)^(1/2)*517i)/(15552*((2^(1/2)*3619i)/10368 
- 517/162)) - (517*2^(1/2)*x*(2^(1/2)*1551i + 2895)^(1/2))/(31104*((2^(1/2 
)*3619i)/10368 - 517/162)))*(2^(1/2)*1551i + 2895)^(1/2)*1i)/144 - (atan(( 
x*(2895 - 2^(1/2)*1551i)^(1/2)*517i)/(15552*((2^(1/2)*3619i)/10368 + 517/1 
62)) + (517*2^(1/2)*x*(2895 - 2^(1/2)*1551i)^(1/2))/(31104*((2^(1/2)*3619i 
)/10368 + 517/162)))*(2895 - 2^(1/2)*1551i)^(1/2)*1i)/144 - ((21*x^2)/8 + 
(19*x^4)/24 + 4/3)/(3*x + 2*x^3 + x^5)